Skip to content

Move PaymentSheet String utils out of StripePaymentsUI#5970

Draft
davidme-stripe wants to merge 2 commits intodavidme/move-ps-imagesfrom
davidme/move-ps-string-utils
Draft

Move PaymentSheet String utils out of StripePaymentsUI#5970
davidme-stripe wants to merge 2 commits intodavidme/move-ps-imagesfrom
davidme/move-ps-string-utils

Conversation

@davidme-stripe
Copy link
Contributor

Summary

Motivation

Testing

Changelog

@davidme-stripe davidme-stripe force-pushed the davidme/move-ps-string-utils branch from 1715c42 to 391cc83 Compare January 12, 2026 23:19
@emerge-tools
Copy link

emerge-tools bot commented Jan 12, 2026

1 build increased size, 2 builds decreased size, 5 builds had no size change

Name Version Download Change Install Change Approval
StripeSize
com.stripe.StripeSize
1.0 (1) 2.1 MB ⬇️ 2.6 kB (-0.12%) 6.8 MB ⬇️ 1.9 kB (-0.03%) N/A
StripePaymentsSize
com.stripe.StripePaymentsSize
1.0 (1) 1.2 MB - 4.2 MB - N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
1.0 (1) 1.9 MB ⬇️ 2.5 kB (-0.13%) 6.4 MB ⬇️ 1.9 kB (-0.03%) N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
1.0 (1) 4.4 MB ⬆️ 82.2 kB (1.92%) 12.5 MB ⬆️ 110.9 kB (0.9%) N/A
StripeIdentitySize
com.stripe.StripeIdentitySize
1.0 (1) 1.3 MB - 4.2 MB - N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
1.0 (1) 502.7 kB - 1.7 MB - N/A
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
1.0 (1) 1.6 MB - 5.0 MB - N/A
StripeConnectSize
com.stripe.StripeConnectSize
1.0 (1) 1.8 MB ⬇️ 4 B 6.0 MB - N/A

StripeSize 1.0 (1)
com.stripe.StripeSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 1.9 kB (-0.03%)
Total download size change: ⬇️ 2.6 kB (-0.12%)

Largest size changes

Item Install Size Change
Other ⬆️ 1.8 kB
Packed Asset ⬇️ 0 B
🗑 StripePaymentsUI.STPStringUtils.sanitizedExpirationDateFromOCRStr... ⬇️ -896 B
🗑 StripePaymentsUI.STPStringUtils.stringMayContainExpirationDate ⬇️ -592 B
Other ⬇️ -2.2 kB
View Treemap

Image of diff

StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize

No changes to report

StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬇️ 1.9 kB (-0.03%)
Total download size change: ⬇️ 2.5 kB (-0.13%)

Largest size changes

Item Install Size Change
Other ⬆️ 1.8 kB
Packed Asset ⬇️ 0 B
🗑 StripePaymentsUI.STPStringUtils.sanitizedExpirationDateFromOCRStr... ⬇️ -716 B
🗑 StripePaymentsUI.STPStringUtils.stringMayContainExpirationDate ⬇️ -580 B
Other ⬇️ -2.3 kB
View Treemap

Image of diff

StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 110.9 kB (0.9%)
Total download size change: ⬆️ 82.2 kB (1.92%)

Largest size changes

Item Install Size Change
Packed Asset ⬆️ 0 B
Other ⬆️ 9.8 kB
🗑 StripePaymentSheet.STPStringUtils ⬇️ -8.6 kB
📝 icon-card-unionpay.svg (Vector) ⬆️ 5.5 kB
📝 StripePaymentSheet.PaymentSheetStringUtils.applyLinksToString(tem... ⬆️ 3.1 kB
View Treemap

Image of diff

StripeIdentitySize 1.0 (1)
com.stripe.StripeIdentitySize

No changes to report

StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize

No changes to report

StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize

No changes to report

StripeConnectSize 1.0 (1)
com.stripe.StripeConnectSize

No changes to report


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@github-actions
Copy link

github-actions bot commented Jan 12, 2026

🚨 New dead code detected in this PR:

STPStringUtils.swift:207 warning: Unused property 'expirationDateStringRegex'
STPStringUtils.swift:214 warning: Unused function 'expirationDateString(from:)'
STPStringUtils.swift:244 warning: Unused property 'stringMayContainExpirationDateRegex'
STPStringUtils.swift:253 warning: Unused function 'stringMayContainExpirationDate(_:)'
STPStringUtils.swift:262 warning: Unused property 'slashFormattedExpirationDateRegex'
STPStringUtils.swift:269 warning: Unused function 'sanitizedExpirationDateFromOCRString(_:)'

Please remove the dead code before merging.

If this is intentional, you can bypass this check by adding the label skip dead code check to this PR.

ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with master.

[find-dead-code]

@davidme-stripe davidme-stripe changed the base branch from master to davidme/move-ps-images January 26, 2026 23:37
Copies card brand and other payment-related images to StripePaymentSheet and creates PaymentSheetImageLibrary to replace STPImageLibrary usage.
Moves string utility functions from StripePaymentsUI to StripePaymentSheet.
@davidme-stripe davidme-stripe force-pushed the davidme/move-ps-string-utils branch from 391cc83 to 4ec2b39 Compare January 26, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant